﻿/*
参数说明
_orderno：订单编号
_money：订单金额
_productList：商品列表，格式为：商品1ID,商品1数量;商品2ID,商品2数量;...
*/
var _paq = _paq || [];
//提交订单成功
function DSPGoForOrderSuccess(soid,money,productList)
{
    //piwik
    _paq.push(["setCustomVariable", 1, "showOrder", soid, "page"]);

    IPinYouForOrderSuccess(soid, money, productList);
}
function IPinYouForOrderSuccess(orderNo, money, productList) {
    !function (w, d, e) {
        var b = location.href, c = d.referrer, f, s, g = d.cookie, h = g.match(/(^|;)\s*ipycookie=([^;]*)/), i = g.match(/(^|;)\s*ipysession=([^;]*)/);
        if (w.parent != w) {
            f = b; b = c; c = f;
        };
        u = '//stats.ipinyou.com/cvt?a=' + e('QPs.SHs.OxDy_RlgdZPvLvtqhrJXJP') + '&c=' + e(h ? h[2] : '') + '&s=' + e(i ? i[2].match(/jump\%3D(\d+)/)[1] : '')
            + '&u=' + e(b) + '&r=' + e(c) + '&rd=' + (new Date()).getTime() + '&OrderNo=' + e(orderNo) + '&Money=' + e(money) + '&ProductList=' + e(productList) + '&e=';
        function _() {
            if (!d.body) {
                setTimeout(_(), 100);
            }
            else {
                s = d.createElement('script');
                s.src = u;
                d.body.insertBefore(s, d.body.firstChild);
            }
        } _();
    }(window, document, encodeURIComponent);
}
